Files

poq_margins.Rmd
This R Markdown file contains code and analysis related to:

* Introduction's Descriptive survey
* Table 7: Statistical results of experimental conditions across groups
* Table 8: Linear regression model predicting candidate support under each treatment condition
* Figure 4: Effect of justice dimensions on support for the candidate, broken down by recall vote choice
* Figure 3: Effect of justice dimensions on support for 'Conflicted Progressives'
* Figure 5, 6, 7: Random Forest model and analysis
* Figure I.1: Effect of justice dimensions on support, broken down by estimated recall vote choice
* Figure 2, G.1, SI Table 2: Effect of 'Chesa Boudin' on progressive policies support
* Figure 1: Voters on the progressive scale

poq_margins_descriptives.Rmd
This R Markdown file contains code and analysis related to:

* Table 3, 4: Comparisons between different voter groups
* Table 2: Regression analysis of factors influencing recall vote
* Figure E.1: Predictors of recall support
* Sample analysis: Exit poll data
* Lucid sample analysis
* Figure C.1: Counties by progressive scale
* Text analysis: Creating dataframes for text analysis
* Using the text package for ML text summarization
* Figure 8, 9: Keyness analysis of text data

Usage
To run these files locally, you'll need to set up your project directory and ensure all necessary data files are accessible within the defined structure. Here's how you can use the here package effectively:

1. Project Structure:

Organize your project with a clear root directory. This is where your main R Markdown files (e.g., "poq_margins.Rmd" and "poq_margins_descriptives.Rmd") should be located.
Create a subdirectory named "data" within your project root to store all the required data files (e.g., "igs_oct_23.dta", "da_clean.RData", etc.).
2. Using the here Package:

The here package helps you create paths relative to your project's root directory, making your code more portable and less prone to errors when shared or moved.
In your R Markdown files, use here() to construct file paths. For example, to load "igs_oct_23.dta" located in the "data" subdirectory, use:
igs_oct_23 <- haven::read_dta(here("data", "igs_oct_23.dta"))
